<?php
class model_link_hits extends common_model {
	/**
	 * 基本表属性
	 */
	protected $table = 'link_hits';
	
	/**
	 * 获取当天的点击总量
	 */
	public function sum_today() {
		$time = strtotime(date('Y-m-d'));
		$res = $this->find("create_time >= $time", '', '', 'COUNT(*) count');
		return $res['count'];
	}
}
?>